<!DOCTYPE html>
<html lang="zh-CN">
  	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title></title>
		
		<link rel="stylesheet" href="/css/bootstrap.min.css" />
		<link rel="stylesheet" href="/css/header.css" />
		<link rel="stylesheet" href="/css/admin.css" />
		<link rel="stylesheet" href="/css/sweetalert.css" />
	</head>
	
	<body>
		
		<%- include header %>
		
		<div class="container">
			<div class="news-admin">
				<% if(rollNews[0] != 'no') { %>
				<div id="rollNewsAdmin">
					<div class="page-header">
					    <h3>滚动新闻</h3>
					    <!--<form class="form-inline">
							<div class="form-group">
							    <label for="societyNewsTitle">标题</label>
							    <input type="text" class="form-control" id="societyNewsTitle" placeholder="请输入标题关键字">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendUser">发布者</label>
							    <input type="email" class="form-control" id="societyNewsSendUser" placeholder="请输入发布者">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendTime">发布时间</label>
							    <input type="email" class="form-control" id="societyNewsSendTime" placeholder="请输入发布时间">
							</div>
							<button type="submit" class="btn btn-default">搜索</button>
						</form>-->
					</div>
					
					<div class="table-responsive">
					    <table class="table table-hover table-condensed table-bordered ">
					    	<thead>
					    		<tr>
					    			<th>id</th>
					    			<th>标题</th>
					    			<th>副标题</th>
					    			<th>发布者</th>
					    			<th>发布时间</th>
					    			<th>点击量</th>
					    			<th>评论数</th>
					    			<th></th>
					    		</tr>
					    	</thead>
					    	<tbody>
					    		<% rollNews.forEach(function(item) { %>
					    			<tr>
					    				<td><%= item.id %></td>
						    			<td><%= item.title %></td>
						    			<td><%= item.smallTitle %></td>
						    			<td><%= item.sendCount %></td>
						    			<td><%= item.sendTime %></td>
						    			<td><%= item.click %></td>
						    			<td><%= item.comment %></td>
						    			<td>
						    				<button class="btn btn-sm btn-info" data-value="newsUpdate">修改</button>
						    				<button class="btn btn-sm btn-danger" data-value="newsDelete">删除</button>
						    			</td>
					    			</tr>
					    		<% }) %>
					    	</tbody>
					    </table>
					    
					    <!--<nav aria-label="...">
							<ul class="pager">
							    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
							    <li><strong>30/100</strong></li>
							    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
							</ul>
						</nav>-->
					</div>
					
					<div class="table-footer text-right">
						<a href="/admin/publish?classify=滚动"><button class="btn btn-info" data-value="sendNews">发布</button></a>
					</div>
				</div>
				<% } %>
				
				<% if(societyNews[0] != 'no') { %>
				<div id="societyNewsAdmin">
					<div class="page-header">
					    <h3>社会新闻</h3>
					    <!--<form class="form-inline">
							<div class="form-group">
							    <label for="societyNewsTitle">标题</label>
							    <input type="text" class="form-control" id="societyNewsTitle" placeholder="请输入标题关键字">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendUser">发布者</label>
							    <input type="email" class="form-control" id="societyNewsSendUser" placeholder="请输入发布者">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendTime">发布时间</label>
							    <input type="email" class="form-control" id="societyNewsSendTime" placeholder="请输入发布时间">
							</div>
							<button type="submit" class="btn btn-default">搜索</button>
						</form>-->
					</div>
					
					<div class="table-responsive">
					    <table class="table table-hover table-condensed table-bordered ">
					    	<thead>
					    		<tr>
					    			<th>id</th>
					    			<th>标题</th>
					    			<th>副标题</th>
					    			<th>发布者</th>
					    			<th>发布时间</th>
					    			<th>点击量</th>
					    			<th>评论数</th>
					    			<th></th>
					    		</tr>
					    	</thead>
					    	<tbody>
					    		<% societyNews.forEach(function(item) { %>
					    			<tr>
					    				<td><%= item.id %></td>
						    			<td><%= item.title %></td>
						    			<td><%= item.smallTitle %></td>
						    			<td><%= item.sendCount %></td>
						    			<td><%= item.sendTime %></td>
						    			<td><%= item.click %></td>
						    			<td><%= item.comment %></td>
						    			<td>
						    				<button class="btn btn-sm btn-info" data-value="newsUpdate">修改</button>
						    				<button class="btn btn-sm btn-danger" data-value="newsDelete">删除</button>
						    			</td>
					    			</tr>
					    		<% }) %>
					    	</tbody>
					    </table>
					    
					    <!--<nav aria-label="...">
							<ul class="pager">
							    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
							    <li><strong>30/100</strong></li>
							    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
							</ul>
						</nav>-->
					</div>
					
					<div class="table-footer text-right">
						<a href="/admin/publish?classify=社会"><button class="btn btn-info" data-value="sendNews">发布</button></a>
					</div>
				</div>
				<% } %>
				
				<% if(amusementNews[0] != 'no') { %>
				<div id="amusementNewsAdmin">
					<div class="page-header">
					    <h3>娱乐新闻</h3>
					    <!--<form class="form-inline">
							<div class="form-group">
							    <label for="societyNewsTitle">标题</label>
							    <input type="text" class="form-control" id="societyNewsTitle" placeholder="请输入标题关键字">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendUser">发布者</label>
							    <input type="email" class="form-control" id="societyNewsSendUser" placeholder="请输入发布者">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendTime">发布时间</label>
							    <input type="email" class="form-control" id="societyNewsSendTime" placeholder="请输入发布时间">
							</div>
							<button type="submit" class="btn btn-default">搜索</button>
						</form>-->
					</div>
					
					<div class="table-responsive">
					    <table class="table table-hover table-condensed table-bordered ">
					    	<thead>
					    		<tr>
					    			<th>id</th>
					    			<th>标题</th>
					    			<th>副标题</th>
					    			<th>发布者</th>
					    			<th>发布时间</th>
					    			<th>点击量</th>
					    			<th>评论数</th>
					    			<th></th>
					    		</tr>
					    	</thead>
					    	<tbody>
					    		<% amusementNews.forEach(function(item) { %>
					    			<tr>
					    				<td><%= item.id %></td>
						    			<td><%= item.title %></td>
						    			<td><%= item.smallTitle %></td>
						    			<td><%= item.sendCount %></td>
						    			<td><%= item.sendTime %></td>
						    			<td><%= item.click %></td>
						    			<td><%= item.comment %></td>
						    			<td>
						    				<button class="btn btn-sm btn-info" data-value="newsUpdate">修改</button>
						    				<button class="btn btn-sm btn-danger" data-value="newsDelete">删除</button>
						    			</td>
					    			</tr>
					    		<% }) %>
					    	</tbody>
					    </table>
					    
					    <!--<nav aria-label="...">
							<ul class="pager">
							    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
							    <li><strong>30/100</strong></li>
							    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
							</ul>
						</nav>-->
					</div>
					
					<div class="table-footer text-right">
						<a href="/admin/publish?classify=娱乐"><button class="btn btn-info" data-value="sendNews">发布</button></a>
					</div>
				</div>
				<% } %>
				
				<% if(scienceNews[0] != 'no') { %>
				<div id="scienceNewsAdmin">
					<div class="page-header">
					    <h3>科技新闻</h3>
					    <!--<form class="form-inline">
							<div class="form-group">
							    <label for="societyNewsTitle">标题</label>
							    <input type="text" class="form-control" id="societyNewsTitle" placeholder="请输入标题关键字">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendUser">发布者</label>
							    <input type="email" class="form-control" id="societyNewsSendUser" placeholder="请输入发布者">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendTime">发布时间</label>
							    <input type="email" class="form-control" id="societyNewsSendTime" placeholder="请输入发布时间">
							</div>
							<button type="submit" class="btn btn-default">搜索</button>
						</form>-->
					</div>
					
					<div class="table-responsive">
					    <table class="table table-hover table-condensed table-bordered ">
					    	<thead>
					    		<tr>
					    			<th>id</th>
					    			<th>标题</th>
					    			<th>副标题</th>
					    			<th>发布者</th>
					    			<th>发布时间</th>
					    			<th>点击量</th>
					    			<th>评论数</th>
					    			<th></th>
					    		</tr>
					    	</thead>
					    	<tbody>
					    		<% scienceNews.forEach(function(item) { %>
					    			<tr>
					    				<td><%= item.id %></td>
						    			<td><%= item.title %></td>
						    			<td><%= item.smallTitle %></td>
						    			<td><%= item.sendCount %></td>
						    			<td><%= item.sendTime %></td>
						    			<td><%= item.click %></td>
						    			<td><%= item.comment %></td>
						    			<td>
						    				<button class="btn btn-sm btn-info" data-value="newsUpdate">修改</button>
						    				<button class="btn btn-sm btn-danger" data-value="newsDelete">删除</button>
						    			</td>
					    			</tr>
					    		<% }) %>
					    	</tbody>
					    </table>
					    
					    <!--<nav aria-label="...">
							<ul class="pager">
							    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
							    <li><strong>30/100</strong></li>
							    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
							</ul>
						</nav>-->
					</div>
					
					<div class="table-footer text-right">
						<a href="/admin/publish?classify=科技"><button class="btn btn-info" data-value="sendNews">发布</button></a>
					</div>
				</div>
				<% } %>
				
				<% if(PENews[0] != 'no') { %>
				<div id="PENewsAdmin">
					<div class="page-header">
					    <h3>体育新闻</h3>
					    <!--<form class="form-inline">
							<div class="form-group">
							    <label for="societyNewsTitle">标题</label>
							    <input type="text" class="form-control" id="societyNewsTitle" placeholder="请输入标题关键字">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendUser">发布者</label>
							    <input type="email" class="form-control" id="societyNewsSendUser" placeholder="请输入发布者">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendTime">发布时间</label>
							    <input type="email" class="form-control" id="societyNewsSendTime" placeholder="请输入发布时间">
							</div>
							<button type="submit" class="btn btn-default">搜索</button>
						</form>-->
					</div>
					
					<div class="table-responsive">
					    <table class="table table-hover table-condensed table-bordered ">
					    	<thead>
					    		<tr>
					    			<th>id</th>
					    			<th>标题</th>
					    			<th>副标题</th>
					    			<th>发布者</th>
					    			<th>发布时间</th>
					    			<th>点击量</th>
					    			<th>评论数</th>
					    			<th></th>
					    		</tr>
					    	</thead>
					    	<tbody>
					    		<% PENews.forEach(function(item) { %>
					    			<tr>
					    				<td><%= item.id %></td>
						    			<td><%= item.title %></td>
						    			<td><%= item.smallTitle %></td>
						    			<td><%= item.sendCount %></td>
						    			<td><%= item.sendTime %></td>
						    			<td><%= item.click %></td>
						    			<td><%= item.comment %></td>
						    			<td>
						    				<button class="btn btn-sm btn-info" data-value="newsUpdate">修改</button>
						    				<button class="btn btn-sm btn-danger" data-value="newsDelete">删除</button>
						    			</td>
					    			</tr>
					    		<% }) %>
					    	</tbody>
					    </table>
					    
					    <!--<nav aria-label="...">
							<ul class="pager">
							    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
							    <li><strong>30/100</strong></li>
							    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
							</ul>
						</nav>-->
					</div>
					
					<div class="table-footer text-right">
						<a href="/admin/publish?classify=体育"><button class="btn btn-info" data-value="sendNews">发布</button></a>
					</div>
				</div>
				<% } %>
				
				<% if(financeNews[0] != 'no') { %>
				<div id="financeNewsAdmin">
					<div class="page-header">
					    <h3>财经新闻</h3>
					    <!--<form class="form-inline">
							<div class="form-group">
							    <label for="societyNewsTitle">标题</label>
							    <input type="text" class="form-control" id="societyNewsTitle" placeholder="请输入标题关键字">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendUser">发布者</label>
							    <input type="email" class="form-control" id="societyNewsSendUser" placeholder="请输入发布者">
							</div>
							<div class="form-group">
							    <label for="societyNewsSendTime">发布时间</label>
							    <input type="email" class="form-control" id="societyNewsSendTime" placeholder="请输入发布时间">
							</div>
							<button type="submit" class="btn btn-default">搜索</button>
						</form>-->
					</div>
					
					<div class="table-responsive">
					    <table class="table table-hover table-condensed table-bordered ">
					    	<thead>
					    		<tr>
					    			<th>id</th>
					    			<th>标题</th>
					    			<th>副标题</th>
					    			<th>发布者</th>
					    			<th>发布时间</th>
					    			<th>点击量</th>
					    			<th>评论数</th>
					    			<th></th>
					    		</tr>
					    	</thead>
					    	<tbody>
					    		<% financeNews.forEach(function(item) { %>
					    			<tr>
					    				<td><%= item.id %></td>
						    			<td><%= item.title %></td>
						    			<td><%= item.smallTitle %></td>
						    			<td><%= item.sendCount %></td>
						    			<td><%= item.sendTime %></td>
						    			<td><%= item.click %></td>
						    			<td><%= item.comment %></td>
						    			<td>
						    				<button class="btn btn-sm btn-info" data-value="newsUpdate">修改</button>
						    				<button class="btn btn-sm btn-danger" data-value="newsDelete">删除</button>
						    			</td>
					    			</tr>
					    		<% }) %>
					    	</tbody>
					    </table>
					    
					    <!--<nav aria-label="...">
							<ul class="pager">
							    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
							    <li><strong>30/100</strong></li>
							    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
							</ul>
						</nav>-->
					</div>
					
					<div class="table-footer text-right">
						<a href="/admin/publish?classify=财经"><button class="btn btn-info" data-value="sendNews">发布</button></a>
					</div>
				</div>
				<% } %>
				
			</div>
			
			
			<div class="user-admin">
				
				<div class="page-header">
				    <h3>用户管理</h3>
				    <!--<form class="form-inline">
						<div class="form-group">
						    <label for="userName">昵称</label>
						    <input type="text" class="form-control" id="userName" placeholder="请输入用户昵称">
						</div>
						<div class="form-group">
						    <label for="userCount">账号</label>
						    <input type="email" class="form-control" id="userCount" placeholder="请输入用户账号">
						</div>
						<div class="form-group">
						    <label for="userCreatTime">创建时间</label>
						    <input type="email" class="form-control" id="userCreatTime" placeholder="请输入创建时间">
						</div>
						<button type="submit" class="btn btn-default">搜索</button>
					</form>-->
				</div>
				
				<div class="table-responsive">
				    <table class="table table-hover table-condensed table-bordered ">
				    	<thead>
				    		<tr>
				    			<th>id</th>
				    			<th>昵称</th>
				    			<th>账号</th>
				    			<th>邮箱</th>
				    			<th>创建日期</th>
				    			<th>状态</th>
				    			<th></th>
				    		</tr>
				    	</thead>
				    	
				    	<tbody>
				    		<% user.forEach(function(item) { %>
				    		<tr>
				    			<td><%= item.id %></td>
				    			<td><%= item.name %></td>
				    			<td><%= item.account %></td>
				    			<td><%= item.email %></td>
				    			<td><%= item.createTime %></td>
				    			<td><%= item.state %></td>
				    			<td>
				    				<div class="btn-group">
										<button type="button" class="btn btn-info btn-sm dropdown-toggle changeStatus" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
										    状态修改 <span class="caret"></span>
										</button>
										<ul class="dropdown-menu">
										    <li><a href="#" data-value="changeState">正常</a></li>
										    <li><a href="#" data-value="changeState">禁言</a></li>
										    <li><a href="#" data-value="changeState">冻结</a></li>
										</ul>
									</div>
				    				<button class="btn btn-sm btn-danger" data-value="userDelete">删除</button>
				    			</td>
				    		</tr>
				    		<% }) %>
				    	</tbody>
				    </table>
				    
				    <!--<nav aria-label="...">
						<ul class="pager">
						    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
						    <li><strong>30/100</strong></li>
						    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
						</ul>
					</nav>-->
				</div>
				
				<div class="table-footer text-right">
					
				</div>
			</div>
			
			
			<% if(adminUser[0] != 'no') { %>
			<div class="manager-admin">
				
				<div class="page-header">
				    <h3>管理员管理</h3>
				    <!--<form class="form-inline">
						<div class="form-group">
						    <label for="adminUserName">昵称</label>
						    <input type="text" class="form-control" id="adminUserName" placeholder="请输入管理员昵称">
						</div>
						<div class="form-group">
						    <label for="adminUserCount">账号</label>
						    <input type="email" class="form-control" id="adminUserCount" placeholder="请输入管理员账号">
						</div>
						<div class="form-group">
						    <label for="adminCreateTime">创建时间</label>
						    <input type="email" class="form-control" id="adminCreateTime" placeholder="请输入创建时间">
						</div>
						<div class="form-group">
						    <label for="adminPower">权限</label>
						    <input type="email" class="form-control" id="adminPower" placeholder="请输入管理员权限">
						</div>
						<button type="submit" class="btn btn-default">搜索</button>
					</form>-->
				</div>
				
				<div class="table-responsive">
				    <table class="table table-hover table-condensed table-bordered ">
				    	<thead>
				    		<tr>
				    			<th>id</th>
				    			<th>昵称</th>
				    			<th>账号</th>
				    			<th>邮箱</th>
				    			<th>创建日期</th>
				    			<th>状态</th>
				    			<th>权限</th>
				    			<th></th>
				    		</tr>
				    	</thead>
				    	
				    	<tbody>
				    		<% adminUser.forEach(function(item) { %>
				    		<tr>
				    			<td><%= item.id %></td>
				    			<td><%= item.name %></td>
				    			<td><%= item.account %></td>
				    			<td><%= item.email %></td>
				    			<td><%= item.createTime %></td>
				    			<td><%= item.state %></td>
				    			<td><%= item.power %></td>
				    			<td>
				    				<div class="btn-group">
										<button type="button" class="btn btn-info btn-sm dropdown-toggle changeStatus" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
										    状态修改 <span class="caret"></span>
										</button>
										<ul class="dropdown-menu">
										    <li><a href="#" data-value="changeState">正常</a></li>
										    <li><a href="#" data-value="changeState">禁言</a></li>
										    <li><a href="#" data-value="changeState">冻结</a></li>
										</ul>
									</div>
									<div class="btn-group">
										<button type="button" class="btn btn-info btn-sm dropdown-toggle addPower" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
										    增加权限 <span class="caret addPower"></span>
										</button>
										<ul class="dropdown-menu">
											<li><a href="#" data-power="2" data-value="addPower">滚动</a></li>
											<li><a href="#" data-power="4" data-value="addPower">社会</a></li>
										    <li><a href="#" data-power="8" data-value="addPower">娱乐</a></li>
										    <li><a href="#" data-power="16" data-value="addPower">科技</a></li>
										    <li><a href="#" data-power="32" data-value="addPower">体育</a></li>
										    <li><a href="#" data-power="64" data-value="addPower">财经</a></li>
										    <li><a href="#" data-power="1" data-value="addPower">超级管理员</a></li>
										</ul>
									</div>
									<div class="btn-group">
										<button type="button" class="btn btn-info btn-sm dropdown-toggle cutPower" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
										    删除权限 <span class="caret cutPower"></span>
										</button>
										<ul class="dropdown-menu">
											<li><a href="#" data-power="2" data-value="cutPower">滚动</a></li>
											<li><a href="#" data-power="4" data-value="cutPower">社会</a></li>
										    <li><a href="#" data-power="8" data-value="cutPower">娱乐</a></li>
										    <li><a href="#" data-power="16" data-value="cutPower">科技</a></li>
										    <li><a href="#" data-power="32" data-value="cutPower">体育</a></li>
										    <li><a href="#" data-power="64" data-value="cutPower">财经</a></li>
										    <li><a href="#" data-power="1" data-value="cutPower">超级管理员</a></li>
										</ul>
									</div>
				    				<button class="btn btn-sm btn-danger" data-value="userAdminDelete">删除</button>
				    			</td>
				    		</tr>
				    		<% }) %>
				    	</tbody>
				    </table>
				    
				    <!--<nav aria-label="...">
						<ul class="pager">
						    <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
						    <li><strong>30/100</strong></li>
						    <li class="next"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
						</ul>
					</nav>-->
				</div>
				
				<div class="table-footer text-right">
					<button class="btn btn-info" data-value="createAdmin">创建管理员</button>
				</div>
			</div>
			<% } %>
			
			
		</div>
	
		
		<!-------------------            Modal start         ------------------------->
		
		<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
			<div class="modal-dialog" role="document" aria-hidden="true">
			    <div class="modal-content">
			    	
			    	
				   
				   
				   
				    
			    </div>
			</div>
		</div>
		
		<!-------------------            Modal end         ------------------------->
		
		<script type="text/javascript" src="/js/jquery-3.1.1.min.js" ></script>
		<script type="text/javascript" src="/js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="/js/sweetalert.min.js" ></script>
		<script src="/js/admin.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
